package com.codejam.gof.prototype.shadow;

public class ShadowCloneMain {

    /**
     * 浅克隆
     * @param args
     */
    public static void main(String[] args) {
        System.out.println("WeeklyLog-----------");

        WeeklyLog log1,log2;

        log1 = new WeeklyLog();

        Attachment attachment = new Attachment("name1");
        log1.setAttachment(attachment);
        log2 = log1.clone();

        System.out.println(log1 == log2);
        System.out.println(log1.getAttachment() == log2.getAttachment());
    }
}
